package org.jeecg.modules.crm.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * @Description: 项目信息
 * @Author: jeecg-boot
 * @Date:   2023-06-03
 * @Version: V1.0
 */
@Data
@TableName("crm_project")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="crm_project对象", description="项目信息")
public class CrmProject implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    /**主键*/
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
    
    /**客户ID*/
    @ApiModelProperty(value = "客户ID")
    private String customerId;
    
    /**项目名称*/
    @Excel(name = "项目名称", width = 15)
    @ApiModelProperty(value = "项目名称")
    private String projectName;


    /**客户名称*/
    @Excel(name = "客户名称", width = 15)
    @ApiModelProperty(value = "客户名称")
    private transient String customerName;
    
    /**联系人*/
    @Excel(name = "联系人", width = 15)
    @ApiModelProperty(value = "联系人")
    private String contactPerson;
    
    /**联系电话*/
    @Excel(name = "联系电话", width = 15)
    @ApiModelProperty(value = "联系电话")
    private String contactPhone;

    /**
     * 省编码
     */
    @ApiModelProperty(value = "省编码")
    private String provinceCode;

    /**
     * 省名称
     */
    @Excel(name = "省", width = 15)
    @ApiModelProperty(value = "省名称")
    private String provinceName;

    /**
     * 市编码
     */
    @ApiModelProperty(value = "市编码")
    private String cityCode;

    /**
     * 市名称
     */
    @Excel(name = "市", width = 15)
    @ApiModelProperty(value = "市名称")
    private String cityName;

    /**
     * 区编码
     */
    @ApiModelProperty(value = "区编码")
    private String areaCode;

    /**
     * 区名称
     */
    @Excel(name = "区", width = 15)
    @ApiModelProperty(value = "区名称")
    private String areaName;


    /**详细地址*/
    @Excel(name = "详细地址", width = 15)
    @ApiModelProperty(value = "详细地址")
    private String address;
    
    /**项目状态*/
    @Excel(name = "项目状态", width = 15, dicCode = "project_status")
    @ApiModelProperty(value = "项目状态(0-未开始,1-进行中,2-已完成)")
    private Integer status;
    
    /**开始日期*/
    @Excel(name = "开始日期", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "开始日期")
    private Date startDate;
    
    /**结束日期*/
    @Excel(name = "结束日期", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "结束日期")
    private Date endDate;
    
    /**项目金额*/
    @Excel(name = "项目金额", width = 15)
    @ApiModelProperty(value = "项目金额")
    private BigDecimal projectAmount;
    
    /**项目描述*/
    @Excel(name = "项目描述", width = 15)
    @ApiModelProperty(value = "项目描述")
    private String description;
    
    /**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
    
    /**创建时间*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    
    /**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
    
    /**更新时间*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;
    
    /**删除状态*/
    @TableLogic
    @ApiModelProperty(value = "删除状态(0-正常,1-已删除)")
    private Integer delFlag;

    /**
     * 租户ID
     */
    private Integer tenantId;
    
    // 查询条件字段，不持久化到数据库
    @TableField(exist = false)
    private String startDateBegin;
    
    @TableField(exist = false)
    private String startDateEnd;
    
    @TableField(exist = false)
    private String endDateBegin;
    
    @TableField(exist = false)
    private String endDateEnd;
    
    @TableField(exist = false)
    private String projectAmountBegin;
    
    @TableField(exist = false)
    private String projectAmountEnd;
} 